package com.easychat.entity.enums;

public enum MessageStatusEnum {
    LOADING(0, "发送中"),
    COMPLETED(1, "已完成");

    private Integer status;
    private String description;

    MessageStatusEnum(Integer status, String description) {
        this.status = status;
        this.description = description;
    }

    public Integer getStatus() {
        return status;
    }

    public String getDescription() {
        return description;
    }

    public static MessageStatusEnum getByStatus(Integer status) {
        for (MessageStatusEnum statusEnum : MessageStatusEnum.values()) {
            if (statusEnum.getStatus().equals(status)) {
                return statusEnum;
            }
        }
        return null;
    }
}
